/**
 * Copyright (c) 2018 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package ai.mspbots.test.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

/**
 * 数据字典
 *
 * @author Mark sunlightcs@gmail.com
 */
@Data
@TableName("sys_dict_data")
public class SysDictDataEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;
	/**
	 * 字典类型ID
	 */
	private Long dictTypeId;
	/**
	 * 字典标签
	 */
	private String dictLabel;
	/**
	 * 字典值
	 */
	private String dictValue;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 排序
	 */
	private Integer sort;
	/**
	 * 更新者
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Long updater;
	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateDate;

	private Long tenantCode;

	private String subjectCode;
	private String dictType;

	private Long getStartedAboutId;

	private Integer integrationId;

	private Integer status;

	private String scope;

	private String agentCode;

	@Override
	public boolean equals(final Object obj){
		if(obj instanceof SysDictDataEntity){
			SysDictDataEntity entity = (SysDictDataEntity) obj;
			return Objects.equals(this.tenantCode,entity.getTenantCode()) && Objects.equals(this.getSubjectCode(),entity.getSubjectCode());
		}
		return false;
	}

	@Override
	public int hashCode() {
		return tenantCode.intValue();
	}
}
